package com.worldcup.dao;

import com.worldcup.model.Game;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author duwan.zq
 */
@Mapper
@Repository
public interface GameMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Game record);

    int insertSelective(Game record);

    Game selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Game record);

    int updateByPrimaryKey(Game record);

    /**
     * listbyGroup
     * @param group
     * @param city
     * @param team
     * @param limit
     * @return
     */
    List<Game> selectByGroup(@Param("group") String group, @Param("city") String city, @Param("team") String team, @Param("limit") Integer limit);

    /**
     * selectByType
     * @param type
     * @return
     */
    List<Game> selectByType(@Param("type") String type);
}